-
-
Notifications
You must be signed in to change notification settings - Fork 770
Add manifest v2->v3 converter + Rollup bundling #3393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
simon1st25
wants to merge
11
commits into
code-charity:master
Choose a base branch
from
simon1st25:feature/manifest-v3-converter
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Add manifest v2->v3 converter + Rollup bundling #3393
simon1st25
wants to merge
11
commits into
code-charity:master
from
simon1st25:feature/manifest-v3-converter
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Author
|
Testing & review instructions for this PR Quick test (local):
npm install --legacy-peer-deps
node scripts/convert-manifest.js --input build/manifest2.json --output build/manifest3.json --bundle-sw
Notes & cautions:
Suggested follow-ups:
If you want, I can add the CI job or update the PR description with this checklist. |
…ifact with PR/run prefix
…th artifact download link
…ed (create if missing)
… artifacts uploaded
Author
|
Kurzinfo: Die CI-Artefakt-Automation ist nun aktiv.
Trigger: Push oder Update der PR (z. B. ein zusätzlicher Commit). Wenn du eine andere Farbe, Namen oder zusätzliche Empfänger möchtest, sag kurz Bescheid. |
Member
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds a best-effort manifest v2 -> v3 converter, optional service-worker bundling via Rollup, a VS Code workspace file, and a short WORKSPACE_README.md explaining usage.
Files changed:
scripts/convert-manifest.js(converter, --bundle-sw support, warnings)scripts/rollup.config.js(rollup config to bundle background scripts)package.json(bundle script + devDependencies)youtube.code-workspace(workspace settings)WORKSPACE_README.md(how to open workspace & run converter)How to test locally:
build/manifest3.json— checkmanifest_version: 3,background.service_workerandhost_permissions.build/generated_service_worker.js— review the generated bundle for APIs incompatible with MV3.Notes & cautions:
webRequestusage, and any APIs that require adaptation for Manifest V3 (e.g., usedeclarativeNetRequestfor blocking network requests).npm ci && npm run bundle-swand artifacts publishing.CI workflow added:
.github/workflows/manifest-v3.ymlwas added in this branch. It runs on pull requests andfeature/**pushes and performs:npm ci --legacy-peer-depsnode scripts/convert-manifest.js --input build/manifest2.json --output build/manifest3.json --bundle-swnode scripts/validate-manifest3.js build/manifest3.jsonThis workflow bundles the service worker and validates the generated
manifest3.json. It fails the check ifmanifest_version !== 3or ifbackground.service_workeris missing.Suggested follow-ups:
"type": "module"topackage.jsonto avoid a Rollup ES module warning during action runs.If you prefer, I can add the CI artifact step or adjust triggers to run only for PRs targeting
masterin the upstream repo.